[## Notation¶
This type of notation add data from request context
object to expressions.
notation start with [##
and end with ##]
.
for example in:
My Id Is : [##cms.query.id##]
Determine that value of cms.query.id
must be inject to expression in specific location.
suppose value of id
key in query string
is Qam-12. after injection process by context,
result is:
My Id Is : Qam-12
Note
[## Notation is case insensitive.
If data contain more than one value, values presend in ,
delimiter string of concated values.
for example in:
Names : [##cms.query.names##]
If query string
is names=ali&names=amir
, then result is:
Names : ali,amir
In expression, we can OR
data source with |
. in this case in order from left to right,
if specified deta source not found, engine try to find next data source.
for example in:
First Question : [##cms.form.quiz1|cms.form.quiz2##]
in above notation, if quiz1
represent in form data than posted to server, entire notation replace with it.
if quiz1 not presented but class:quiz2 exist, notation replace with class:quiz2.
For :
Name |
Value |
---|---|
quiz1 |
what is your name? |
result is:
First Question : what is your name?
For :
Name |
Value |
---|---|
quiz2 |
where are you from? |
result is:
First Question : where are you from?
For :
Name |
Value |
---|---|
quiz1 |
what is your name? |
quiz2 |
where are you from? |
result is:
First Question : what is your name?
Also we can set default value at right must item in list of data source in ()
.
for example in case
First Question : [##cms.form.quiz1|cms.form.quiz2##|(NotSet)]
If nether quiz1
nor quiz2
peresent in posted form result is:
First Question : NotSet